<?php
/**
 * Created by PhpStorm.
 * User: edmmss
 * Date: 2018/11/22
 * Time: 09:38
 */

$db = require __DIR__ . '/db.php';

$components = [
    'request'      => [
        'cookieValidationKey' => '02b4_poHh0fXNPN1t02fNz_6mAu1vzMn',
    ],
    'cache'        => [
        'class' => 'yii\caching\FileCache',
    ],
    'user'         => [
        'identityClass'   => 'app\models\User',
        'enableAutoLogin' => true,
    ],
    'errorHandler' => [
        'errorAction' => 'site/error',
    ],
    'mailer'       => [
        'class'            => 'yii\swiftmailer\Mailer',
        // send all mails to a file by default. You have to set
        // 'useFileTransport' to false and configure a transport
        // for the mailer to send real emails.
        'useFileTransport' => true,
    ],
    'log'          => [
        'traceLevel' => YII_DEBUG ? 3 : 0,
        'targets'    => [
            [
                'class'  => 'yii\log\FileTarget',
                'levels' => ['error', 'warning'],
            ],
        ],
    ],
    'urlManager'   => [
        'enablePrettyUrl' => true,
        'showScriptName'  => false,
        'rules'           => [],
    ],
];

return array_merge($components, $db);